package wifiunion.com.notice.viewholder;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;

import wifiunion.com.notice.R;
import wifiunion.com.notice.RecyclerItemClick;


/**
 * Created by Administrator on 2016/12/5.
 */

public class DeviceSelectSthViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
    public TextView nameTv;
    public CheckBox mCheckbox;
    public View itemRl;
    private RecyclerItemClick mItemClick;
    public DeviceSelectSthViewHolder(View itemView, RecyclerItemClick itemClick) {
        super(itemView);
        nameTv = (TextView) itemView.findViewById(R.id.child_device_name);
        mCheckbox = (CheckBox) itemView.findViewById(R.id.child_selectall_cb);
        mItemClick = itemClick;
        mCheckbox.setOnClickListener(this);
        itemView.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        mItemClick.onItemClick(view,getAdapterPosition());
    }
}
